'use strict';

const Controller = require('egg').Controller;

class HomeController extends Controller {
  async index() {
    this.ctx.body = 'hi, egg';
  }

  async test() {
    const { ctx, app } = this;
    await app.redis.set('age', 25);
    const age = await app.redis.get('age');
    ctx.returnBody({ data: age });
  }
}

module.exports = HomeController;
